Conversation
Running the suite on a freshly booted simulator, with this test as the
first to launch the host app, the runner was killed with SIGTERM about
30 s in ("Test crashed with signal term"). The stub only ever blocks the
tree XPC, but a cold first launch adds a slow "Find the Target
Application" resolution inside the plan. Resolve the application element
before installing the stub, and give the plan wait 60 s instead of 30 so a
slow cold path cannot tear the test down while the plan still runs.
Verified with three cold-boot runs of the test and one full suite from a
fresh boot (248 tests, 0 failures, no runner restart).
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues were identified, and validation passed.
Pull request overview
This PR hardens the iOS snapshot occupancy test against slow cold launches.
Changes:
- Resolves the host app and reads its frame before installing the stub.
- Extends the plan wait timeout from 30 to 60 seconds.
File summaries
| File | Summary |
|---|---|
apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+SnapshotCapturePlanOccupancyTests.swift |
Stabilizes cold-launch snapshot occupancy coverage. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
Clean at 09d30bf. Resolving the app element before the stub is installed, and giving the plan wait 60 s, keeps the cold first launch out of the blocked tree snapshot without changing what the test asserts. The change stays inside one XCTest file, all checks pass and there are no conflicts; the cold-boot runs in the PR body cover the changed setup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #2621. Running the iOS suite on a freshly booted simulator, with
testAbandonedTreeCaptureSkipsQuerySweepAndHonorsWarmupExemptionas the first test to launch the host app, the test runner was killed withSIGTERMabout 30 s in (Test crashed with signal term; the console showedFind the Target Applicationand then nothing for 28 s). A probe build confirmed the stub is entered only fromcaptureSnapshotRoot, so the intended block is the tree XPC; the cold first launch adds a slow resolution of the application element inside the plan.The test now resolves the element before installing the stub (
wait(for: .runningForeground)plus oneframeread) and gives the plan wait 60 s instead of 30, so a slow cold path cannot tear the test down while the plan is still running. 1 file, +5/-1.Validation
Tested commit
09d30bfbe.